class ValidatorTag { 
    static async createTag(v) { 
        console.log('Tag验证器',v)
        if (!v.name) { 
            throw new global.errs.ParameterException('tag_name必填')
        }
        if (/[^\w\d\.\u4e00-\u9fa5]+/ig.test(v.name)) { 
            throw new global.errs.ParameterException('仅限数字,中英文,小数点')
        }
        console.log('Tag验证器全员通过')
    }

    static async getTag(tagId) {   
        if (isNaN(tagId)) {
            throw new global.errs.ParameterException('tagId应为number类型')
        }
    }
}

module.exports=ValidatorTag